"""API 接口配置."""

API_CONFIG = {
    "auth": {
        "label": "认证接口",
        "endpoints": {
            "get_token": {
                "path": "/iuap-api-auth/open-auth/selfAppAuth/base/v1/getAccessToken",
                "method": "GET",
                "description": "获取认证 Token",
                "auth_required": False,
                "params": {
                    "appKey": {"type": "string", "required": True},
                    "timestamp": {"type": "long", "required": True},
                    "signature": {"type": "string", "required": True}
                }
            }
        }
    },
    "production": {
        "label": "生产制造",
        "endpoints": {
            "order_list": {
                "path": "/iuap-api-gateway/yonbip/mfg/productionorder/list",
                "method": "POST",
                "description": "生产订单列表查询",
                "auth_required": True
            },
            "order_detail": {
                "path": "/iuap-api-gateway/yonbip/mfg/productionorder/detail",
                "method": "GET",
                "description": "生产订单详情查询",
                "auth_required": True
            },
            "finished_report_save": {
                "path": "/iuap-api-gateway/yonbip/mfg/finishedreport/new/save",
                "method": "POST",
                "description": "完工报告保存",
                "auth_required": True
            }
        }
    },
    "inspection": {
        "label": "检验业务",
        "endpoints": {
            "checkapply_list": {
                "path": "/iuap-api-gateway/yonbip/QMS_QIT/checkapply/list",
                "method": "POST",
                "description": "检验申请列表查询",
                "auth_required": True
            },
            "checkapply_detail": {
                "path": "/iuap-api-gateway/yonbip/QMS_QIT/checkapply/detail",
                "method": "GET",
                "description": "检验申请详情查询",
                "auth_required": True
            },
            "inspectorder_save": {
                "path": "/iuap-api-gateway/yonbip/QMS_QIT/inspectorder/save",
                "method": "POST",
                "description": "检验单保存",
                "auth_required": True
            }
        }
    },
    "inventory": {
        "label": "库存管理",
        "endpoints": {
            "stock_query": {
                "path": "/iuap-api-gateway/yonbip/scm/stock/QueryCurrentStocksByCondition",
                "method": "POST",
                "description": "现存量查询",
                "auth_required": True
            },
            "material_out": {
                "path": "/iuap-api-gateway/yonbip/scm/materialout/mergeSourceData/save",
                "method": "POST",
                "description": "材料出库保存",
                "auth_required": True
            }
        }
    }
}
